import { success } from './_utils'

export default [
  {
    url: '/opm/api/user/info',
    method: 'get',
    response: ({ _query }) => {
      return success({
        id: '656817b8d711e3b0d307ba1e',
        phone: '13368680909',
        name: '张三',
        avatar: 'https://picx.zhimg.com/v2-abed1a8c04700ba7d72b45195223e0ff_l.jpg?source=32738c0c',
      })
    },
  },

  {
    url: '/opm/api/user/permission',
    method: 'get',
    response: ({ _query }) => {
      return success(['org-user:role', 'org-user:org', 'org-user:user', 'org-user:user:create'])
    },
  },

  {
    url: '/opm/api/user/permission1',
    method: 'get',
    response: ({ _query }) => {
      return success([{
        id: '1',
        title: '首页',
        path: '/home',
        component: '/home',
        type: 0,
        sortNumber: 1,
        code: 'home',
      }, {
        id: '2',
        title: '组织机构',
        path: '/user',
        component: '/user',
        type: 0,
        sortNumber: 1,
        code: 'user',
        icon: 'UserOutlined',
      }, {
        id: '21',
        parentId: '2',
        title: '行政组织',
        path: '/user/org',
        component: '/user/org',
        type: 0,
        sortNumber: 1,
        code: 'user:org',
        icon: 'UserOutlined',
      }, {
        id: '21',
        parentId: '2',
        title: '角色列表',
        path: '/user/role',
        component: '/user/role',
        type: 0,
        sortNumber: 2,
        code: 'user:role',
        icon: 'UserOutlined',
      }])
    },
  },
]
